Optimal. Leaf size=136 \[ \frac {\sqrt {2} (A+C) \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d}+\frac {2 A \sin (c+d x)}{3 d \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}}-\frac {2 A \sqrt {\sec (c+d x)} \sin (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.22, antiderivative size = 136, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 37, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.108, Rules used = {4172, 4098,
3893, 212} \begin {gather*} \frac {\sqrt {2} (A+C) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x) \sqrt {\sec (c+d x)}}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d}-\frac {2 A \sin (c+d x) \sqrt {\sec (c+d x)}}{3 d \sqrt {a \sec (c+d x)+a}}+\frac {2 A \sin (c+d x)}{3 d \sqrt {\sec (c+d x)} \sqrt {a \sec (c+d x)+a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 3893
Rule 4098
Rule 4172
Rubi steps
\begin {align*} \int \frac {A+C \sec ^2(c+d x)}{\sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}} \, dx &=\frac {2 A \sin (c+d x)}{3 d \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}}+\frac {2 \int \frac {-\frac {a A}{2}+\frac {1}{2} a (2 A+3 C) \sec (c+d x)}{\sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}} \, dx}{3 a}\\ &=\frac {2 A \sin (c+d x)}{3 d \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}}-\frac {2 A \sqrt {\sec (c+d x)} \sin (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}+(A+C) \int \frac {\sqrt {\sec (c+d x)}}{\sqrt {a+a \sec (c+d x)}} \, dx\\ &=\frac {2 A \sin (c+d x)}{3 d \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}}-\frac {2 A \sqrt {\sec (c+d x)} \sin (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}-\frac {(2 (A+C)) \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,-\frac {a \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}\\ &=\frac {\sqrt {2} (A+C) \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d}+\frac {2 A \sin (c+d x)}{3 d \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}}-\frac {2 A \sqrt {\sec (c+d x)} \sin (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(273\) vs. \(2(136)=272\).
time = 4.10, size = 273, normalized size = 2.01 \begin {gather*} \frac {\sqrt {1+\sec (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \left (-\frac {16 A \sqrt {1+\sec (c+d x)} \sin ^2\left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right )}{\sec ^{\frac {5}{2}}(c+d x)}+3 \sqrt {2} (A+C) \cos ^2(c+d x) \cot (c+d x) \left (\log \left (1-2 \sec (c+d x)-3 \sec ^2(c+d x)-2 \sqrt {2} \sqrt {\sec (c+d x)} \sqrt {1+\sec (c+d x)} \sqrt {\tan ^2(c+d x)}\right )-\log \left (1-2 \sec (c+d x)-3 \sec ^2(c+d x)+2 \sqrt {2} \sqrt {\sec (c+d x)} \sqrt {1+\sec (c+d x)} \sqrt {\tan ^2(c+d x)}\right )\right ) \sqrt {\tan ^2(c+d x)}\right )}{6 d (A+2 C+A \cos (2 (c+d x))) \sqrt {a (1+\sec (c+d x))}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 21.86, size = 171, normalized size = 1.26
method | result | size |
default | \(-\frac {\sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \left (3 A \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+3 C \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sin \left (d x +c \right )+2 A \left (\cos ^{2}\left (d x +c \right )\right )-4 A \cos \left (d x +c \right )+2 A \right ) \left (\cos ^{2}\left (d x +c \right )\right ) \left (\frac {1}{\cos \left (d x +c \right )}\right )^{\frac {3}{2}}}{3 d \sin \left (d x +c \right ) a}\) | \(171\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 373 vs.
\(2 (113) = 226\).
time = 0.62, size = 373, normalized size = 2.74 \begin {gather*} -\frac {\frac {{\left (3 \, \sqrt {2} \cos \left (\frac {2}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right ) \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) - 3 \, \sqrt {2} \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) \sin \left (\frac {2}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right ) - 3 \, \sqrt {2} \log \left (\cos \left (\frac {1}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right )^{2} + \sin \left (\frac {1}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right )^{2} + 2 \, \sin \left (\frac {1}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right ) + 1\right ) + 3 \, \sqrt {2} \log \left (\cos \left (\frac {1}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right )^{2} + \sin \left (\frac {1}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right )^{2} - 2 \, \sin \left (\frac {1}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right ) + 1\right ) - 2 \, \sqrt {2} \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) + 3 \, \sqrt {2} \sin \left (\frac {1}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right )\right )} A}{\sqrt {a}} - \frac {3 \, {\left (\sqrt {2} \log \left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right ) - \sqrt {2} \log \left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 2 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )\right )} C}{\sqrt {a}}}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.43, size = 338, normalized size = 2.49 \begin {gather*} \left [\frac {\frac {3 \, \sqrt {2} {\left ({\left (A + C\right )} a \cos \left (d x + c\right ) + {\left (A + C\right )} a\right )} \log \left (-\frac {\cos \left (d x + c\right )^{2} - \frac {2 \, \sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{\sqrt {a}} - 2 \, \cos \left (d x + c\right ) - 3}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right )}{\sqrt {a}} + \frac {4 \, {\left (A \cos \left (d x + c\right )^{2} - A \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{6 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}}, -\frac {3 \, \sqrt {2} {\left ({\left (A + C\right )} a \cos \left (d x + c\right ) + {\left (A + C\right )} a\right )} \sqrt {-\frac {1}{a}} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {-\frac {1}{a}} \sqrt {\cos \left (d x + c\right )}}{\sin \left (d x + c\right )}\right ) - \frac {2 \, {\left (A \cos \left (d x + c\right )^{2} - A \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{3 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {A + C \sec ^{2}{\left (c + d x \right )}}{\sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )} \sec ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {A+\frac {C}{{\cos \left (c+d\,x\right )}^2}}{\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}}\,{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________